home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CSICNPane 1.0 / CSICNPane / CSICNPane.c next >
Encoding:
Text File  |  1994-11-30  |  1.7 KB  |  71 lines  |  [TEXT/KAHL]

  1. /******************************************************************************
  2.  CSICNPane.c
  3.  
  4.     Creates a pane containing a SICN. See class CSizeBox for code to show/hide
  5.     the sicn on activation/deactivation. (NOTE: I think there is an update bug
  6.     in the code, but you will have to work this out.)
  7.     
  8.     BROWN UNIVERSITY AND ANDREW JAMES GILMARTIN GIVE NO WARRANTY, EITHER
  9.     EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
  10.     INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
  11.     WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
  12.  
  13.     AUTHOR: Andrew_Gilmartin@Brown.Edu
  14.     MODIFIED: 93-04-14
  15.  
  16. ******************************************************************************/
  17.  
  18. //#include <TCLHeaders>
  19. #include "CSICNPane.h"
  20.  
  21.  
  22.  
  23. /******************************************************************************
  24.  ISICNPane
  25.  
  26.     Initialize CSICNPane. Pane does not act like a button by default.
  27. ******************************************************************************/
  28.  
  29. void CSICNPane::ISICNPane
  30.     ( CView *anEnclosure
  31.     , CBureaucrat *aSupervisor
  32.     , short aHEncl
  33.     , short aVEncl
  34.     , SizingOption aHSizing
  35.     , SizingOption aVSizing
  36.     , short SICNid
  37.     , short SICNindex )
  38. {
  39.     LongRect enclFrame;
  40.     
  41.     anEnclosure->GetFrame( &enclFrame );
  42.     
  43.     CPane::IPane
  44.         ( anEnclosure
  45.         , aSupervisor
  46.         , kSICNWidth, kSICNHeight
  47.         , aHEncl, aVEncl
  48.         , aHSizing, aVSizing );
  49.     
  50.     fId = SICNid;
  51.     fIndex = SICNindex;
  52.     
  53. } /* ISICNPane */
  54.  
  55.  
  56.  
  57. /******************************************************************************
  58.  Draw
  59.  
  60.     Draw the SICN.
  61. ******************************************************************************/
  62.  
  63. void CSICNPane::Draw( Rect *area )
  64. {
  65.     Point thePoint;
  66.  
  67.     LongToQDPt( &topLeftL( frame ), &thePoint );
  68.     DrawSICN( fId, fIndex, thePoint );
  69.  
  70. } /* Draw */
  71.